package com.soundnet.androidhelper.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;

import com.soundnet.androidhelper.R;

public class WebviewActivity extends BaseActivity {
    private WebView mWebView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setLayoutId(R.layout.activity_webview);

        setLeftMenuImg(R.mipmap.back_btn);

        Intent intent = this.getIntent();
        String url = intent.getStringExtra("url");

        mWebView = (WebView)findViewById(R.id.webview);
        WebSettings webSettings = mWebView.getSettings();
        webSettings.setJavaScriptEnabled(true);
        mWebView.loadUrl(url);
    }

    public void onClick(View v) {
        if (v.getId() == R.id.left_layout) {
            this.finish();
        }
    }
}
